{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 大盘指数行情列表\n",
    "\n",
    "获取大盘指数实时行情列表，以表格的形式展示大盘指数实时行情。\n",
    "\n",
    "调用方法：\n",
    "```\n",
    "import tushare as ts\n",
    "df = ts.get_index()\n",
    "```\n",
    "\n",
    "返回值说明：\n",
    "\n",
    "    code:指数代码\n",
    "    name:指数名称\n",
    "    change:涨跌幅\n",
    "    open:开盘点位\n",
    "    preclose:昨日收盘点位\n",
    "    close:收盘点位\n",
    "    high:最高点位\n",
    "    low:最低点位\n",
    "    volume:成交量(手)\n",
    "    amount:成交金额（亿元）\n",
    "\n",
    "市场指数：\n",
    "```\n",
    "ts.get_hist_data('sh') #获取上证指数k线数据，其它参数与个股一致，下同\n",
    "ts.get_hist_data('sz') #获取深圳成指k线数据\n",
    "ts.get_hist_data('hs300') #获取沪深300指数k线数据\n",
    "ts.get_hist_data('sz50') #获取上证50指数k线数据\n",
    "ts.get_hist_data('zxb') #获取中小板指数k线数据\n",
    "ts.get_hist_data('cyb') #获取创业板指数k线数据\n",
    "```"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import tushare as ts\n",
    "\n",
    "df = ts.get_index()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>code</th>\n",
       "      <th>name</th>\n",
       "      <th>change</th>\n",
       "      <th>open</th>\n",
       "      <th>preclose</th>\n",
       "      <th>close</th>\n",
       "      <th>high</th>\n",
       "      <th>low</th>\n",
       "      <th>volume</th>\n",
       "      <th>amount</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>000001</td>\n",
       "      <td>上证指数</td>\n",
       "      <td>-0.07</td>\n",
       "      <td>2911.4529</td>\n",
       "      <td>2905.5618</td>\n",
       "      <td>2903.6467</td>\n",
       "      <td>2912.3134</td>\n",
       "      <td>2894.0390</td>\n",
       "      <td>167800207</td>\n",
       "      <td>1664.1208</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>000002</td>\n",
       "      <td>Ａ股指数</td>\n",
       "      <td>-0.07</td>\n",
       "      <td>3049.3071</td>\n",
       "      <td>3043.1279</td>\n",
       "      <td>3041.1007</td>\n",
       "      <td>3050.2133</td>\n",
       "      <td>3031.0179</td>\n",
       "      <td>167619325</td>\n",
       "      <td>1663.0709</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>000003</td>\n",
       "      <td>Ｂ股指数</td>\n",
       "      <td>0.18</td>\n",
       "      <td>293.0641</td>\n",
       "      <td>292.7770</td>\n",
       "      <td>293.3069</td>\n",
       "      <td>293.7392</td>\n",
       "      <td>292.6745</td>\n",
       "      <td>180883</td>\n",
       "      <td>1.0499</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>000008</td>\n",
       "      <td>综合指数</td>\n",
       "      <td>0.12</td>\n",
       "      <td>2648.0221</td>\n",
       "      <td>2639.3408</td>\n",
       "      <td>2642.6162</td>\n",
       "      <td>2649.7769</td>\n",
       "      <td>2629.1104</td>\n",
       "      <td>30059143</td>\n",
       "      <td>290.3185</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>000009</td>\n",
       "      <td>上证380</td>\n",
       "      <td>-0.19</td>\n",
       "      <td>4866.9110</td>\n",
       "      <td>4868.5392</td>\n",
       "      <td>4859.4657</td>\n",
       "      <td>4881.1350</td>\n",
       "      <td>4850.4207</td>\n",
       "      <td>43161894</td>\n",
       "      <td>446.3074</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>000010</td>\n",
       "      <td>上证180</td>\n",
       "      <td>-0.01</td>\n",
       "      <td>7800.3513</td>\n",
       "      <td>7780.1275</td>\n",
       "      <td>7779.3935</td>\n",
       "      <td>7801.9797</td>\n",
       "      <td>7745.5748</td>\n",
       "      <td>59266869</td>\n",
       "      <td>645.7806</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>000011</td>\n",
       "      <td>基金指数</td>\n",
       "      <td>-0.03</td>\n",
       "      <td>5912.8114</td>\n",
       "      <td>5910.4253</td>\n",
       "      <td>5908.7001</td>\n",
       "      <td>5915.9772</td>\n",
       "      <td>5899.9870</td>\n",
       "      <td>29897454</td>\n",
       "      <td>267.6896</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>000012</td>\n",
       "      <td>国债指数</td>\n",
       "      <td>0.01</td>\n",
       "      <td>166.2393</td>\n",
       "      <td>166.2302</td>\n",
       "      <td>166.2410</td>\n",
       "      <td>166.2764</td>\n",
       "      <td>166.1481</td>\n",
       "      <td>177690</td>\n",
       "      <td>1.7389</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>000016</td>\n",
       "      <td>上证50</td>\n",
       "      <td>0.00</td>\n",
       "      <td>2573.9288</td>\n",
       "      <td>2563.5835</td>\n",
       "      <td>2563.6871</td>\n",
       "      <td>2573.9594</td>\n",
       "      <td>2550.9660</td>\n",
       "      <td>26507281</td>\n",
       "      <td>326.6579</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>000017</td>\n",
       "      <td>新综指</td>\n",
       "      <td>-0.07</td>\n",
       "      <td>2458.4447</td>\n",
       "      <td>2453.4620</td>\n",
       "      <td>2451.8299</td>\n",
       "      <td>2459.1755</td>\n",
       "      <td>2443.6943</td>\n",
       "      <td>167608743</td>\n",
       "      <td>1662.7611</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>000300</td>\n",
       "      <td>沪深300</td>\n",
       "      <td>-0.11</td>\n",
       "      <td>3589.5055</td>\n",
       "      <td>3581.7057</td>\n",
       "      <td>3577.7522</td>\n",
       "      <td>3589.9841</td>\n",
       "      <td>3566.3140</td>\n",
       "      <td>96758501</td>\n",
       "      <td>1121.7669</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>000905</td>\n",
       "      <td>中证500</td>\n",
       "      <td>0.08</td>\n",
       "      <td>5308.0154</td>\n",
       "      <td>5304.6410</td>\n",
       "      <td>5308.6569</td>\n",
       "      <td>5332.6160</td>\n",
       "      <td>5294.4201</td>\n",
       "      <td>74850860</td>\n",
       "      <td>722.6687</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>399001</td>\n",
       "      <td>深证成指</td>\n",
       "      <td>-0.02</td>\n",
       "      <td>9475.7210</td>\n",
       "      <td>9465.8020</td>\n",
       "      <td>9463.7600</td>\n",
       "      <td>9514.9380</td>\n",
       "      <td>9436.9860</td>\n",
       "      <td>21314695869</td>\n",
       "      <td>2308.7864</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>399002</td>\n",
       "      <td>深成指R</td>\n",
       "      <td>-0.02</td>\n",
       "      <td>11428.3130</td>\n",
       "      <td>11416.3510</td>\n",
       "      <td>11413.8880</td>\n",
       "      <td>11475.6110</td>\n",
       "      <td>11381.5970</td>\n",
       "      <td>9963819871</td>\n",
       "      <td>1190.5511</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>399003</td>\n",
       "      <td>成份Ｂ指</td>\n",
       "      <td>-0.71</td>\n",
       "      <td>5990.8520</td>\n",
       "      <td>5981.1060</td>\n",
       "      <td>5938.9220</td>\n",
       "      <td>6001.9500</td>\n",
       "      <td>5933.3330</td>\n",
       "      <td>7753541</td>\n",
       "      <td>0.4513</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>399004</td>\n",
       "      <td>深证100R</td>\n",
       "      <td>-0.20</td>\n",
       "      <td>4972.0210</td>\n",
       "      <td>4963.8150</td>\n",
       "      <td>4953.8240</td>\n",
       "      <td>4981.2920</td>\n",
       "      <td>4941.8240</td>\n",
       "      <td>3217136527</td>\n",
       "      <td>485.3226</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>399005</td>\n",
       "      <td>中小板指</td>\n",
       "      <td>-0.01</td>\n",
       "      <td>6619.9990</td>\n",
       "      <td>6606.3270</td>\n",
       "      <td>6605.9860</td>\n",
       "      <td>6651.1840</td>\n",
       "      <td>6583.3690</td>\n",
       "      <td>1865664824</td>\n",
       "      <td>295.5012</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>399006</td>\n",
       "      <td>创业板指</td>\n",
       "      <td>0.17</td>\n",
       "      <td>1629.1270</td>\n",
       "      <td>1629.6100</td>\n",
       "      <td>1632.3200</td>\n",
       "      <td>1645.4450</td>\n",
       "      <td>1626.0860</td>\n",
       "      <td>1976526610</td>\n",
       "      <td>294.9122</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>399008</td>\n",
       "      <td>中小300</td>\n",
       "      <td>0.08</td>\n",
       "      <td>1270.7970</td>\n",
       "      <td>1269.1520</td>\n",
       "      <td>1270.2130</td>\n",
       "      <td>1277.2120</td>\n",
       "      <td>1265.9570</td>\n",
       "      <td>4273882852</td>\n",
       "      <td>508.2764</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>399100</td>\n",
       "      <td>新 指 数</td>\n",
       "      <td>0.04</td>\n",
       "      <td>7328.2240</td>\n",
       "      <td>7324.4100</td>\n",
       "      <td>7327.1500</td>\n",
       "      <td>7359.1730</td>\n",
       "      <td>7305.4450</td>\n",
       "      <td>21141490576</td>\n",
       "      <td>2303.5894</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>399101</td>\n",
       "      <td>中小板综</td>\n",
       "      <td>0.03</td>\n",
       "      <td>9626.8240</td>\n",
       "      <td>9622.5210</td>\n",
       "      <td>9625.4200</td>\n",
       "      <td>9665.8600</td>\n",
       "      <td>9592.3240</td>\n",
       "      <td>8065288135</td>\n",
       "      <td>855.8098</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>399106</td>\n",
       "      <td>深证综指</td>\n",
       "      <td>-0.07</td>\n",
       "      <td>1626.3780</td>\n",
       "      <td>1625.8390</td>\n",
       "      <td>1624.7160</td>\n",
       "      <td>1634.4320</td>\n",
       "      <td>1621.4700</td>\n",
       "      <td>21314695869</td>\n",
       "      <td>2308.7864</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>399107</td>\n",
       "      <td>深证Ａ指</td>\n",
       "      <td>-0.07</td>\n",
       "      <td>1700.5250</td>\n",
       "      <td>1699.9650</td>\n",
       "      <td>1698.8070</td>\n",
       "      <td>1708.9830</td>\n",
       "      <td>1695.4060</td>\n",
       "      <td>21293400232</td>\n",
       "      <td>2307.8826</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>399108</td>\n",
       "      <td>深证Ｂ指</td>\n",
       "      <td>-0.35</td>\n",
       "      <td>1071.4320</td>\n",
       "      <td>1070.1340</td>\n",
       "      <td>1066.4270</td>\n",
       "      <td>1073.0330</td>\n",
       "      <td>1064.9210</td>\n",
       "      <td>21295637</td>\n",
       "      <td>0.9038</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>399333</td>\n",
       "      <td>中小板R</td>\n",
       "      <td>-0.01</td>\n",
       "      <td>7350.4840</td>\n",
       "      <td>7335.3040</td>\n",
       "      <td>7334.9240</td>\n",
       "      <td>7385.1100</td>\n",
       "      <td>7309.8120</td>\n",
       "      <td>1865664824</td>\n",
       "      <td>295.5012</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>399606</td>\n",
       "      <td>创业板R</td>\n",
       "      <td>0.17</td>\n",
       "      <td>1706.3810</td>\n",
       "      <td>1706.8870</td>\n",
       "      <td>1709.7260</td>\n",
       "      <td>1723.4740</td>\n",
       "      <td>1703.1970</td>\n",
       "      <td>1976526610</td>\n",
       "      <td>294.9122</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "      code    name  change        open    preclose       close        high  \\\n",
       "0   000001    上证指数   -0.07   2911.4529   2905.5618   2903.6467   2912.3134   \n",
       "1   000002    Ａ股指数   -0.07   3049.3071   3043.1279   3041.1007   3050.2133   \n",
       "2   000003    Ｂ股指数    0.18    293.0641    292.7770    293.3069    293.7392   \n",
       "3   000008    综合指数    0.12   2648.0221   2639.3408   2642.6162   2649.7769   \n",
       "4   000009   上证380   -0.19   4866.9110   4868.5392   4859.4657   4881.1350   \n",
       "5   000010   上证180   -0.01   7800.3513   7780.1275   7779.3935   7801.9797   \n",
       "6   000011    基金指数   -0.03   5912.8114   5910.4253   5908.7001   5915.9772   \n",
       "7   000012    国债指数    0.01    166.2393    166.2302    166.2410    166.2764   \n",
       "8   000016    上证50    0.00   2573.9288   2563.5835   2563.6871   2573.9594   \n",
       "9   000017     新综指   -0.07   2458.4447   2453.4620   2451.8299   2459.1755   \n",
       "10  000300   沪深300   -0.11   3589.5055   3581.7057   3577.7522   3589.9841   \n",
       "11  000905   中证500    0.08   5308.0154   5304.6410   5308.6569   5332.6160   \n",
       "12  399001    深证成指   -0.02   9475.7210   9465.8020   9463.7600   9514.9380   \n",
       "13  399002    深成指R   -0.02  11428.3130  11416.3510  11413.8880  11475.6110   \n",
       "14  399003    成份Ｂ指   -0.71   5990.8520   5981.1060   5938.9220   6001.9500   \n",
       "15  399004  深证100R   -0.20   4972.0210   4963.8150   4953.8240   4981.2920   \n",
       "16  399005    中小板指   -0.01   6619.9990   6606.3270   6605.9860   6651.1840   \n",
       "17  399006    创业板指    0.17   1629.1270   1629.6100   1632.3200   1645.4450   \n",
       "18  399008   中小300    0.08   1270.7970   1269.1520   1270.2130   1277.2120   \n",
       "19  399100   新 指 数    0.04   7328.2240   7324.4100   7327.1500   7359.1730   \n",
       "20  399101    中小板综    0.03   9626.8240   9622.5210   9625.4200   9665.8600   \n",
       "21  399106    深证综指   -0.07   1626.3780   1625.8390   1624.7160   1634.4320   \n",
       "22  399107    深证Ａ指   -0.07   1700.5250   1699.9650   1698.8070   1708.9830   \n",
       "23  399108    深证Ｂ指   -0.35   1071.4320   1070.1340   1066.4270   1073.0330   \n",
       "24  399333    中小板R   -0.01   7350.4840   7335.3040   7334.9240   7385.1100   \n",
       "25  399606    创业板R    0.17   1706.3810   1706.8870   1709.7260   1723.4740   \n",
       "\n",
       "           low       volume     amount  \n",
       "0    2894.0390    167800207  1664.1208  \n",
       "1    3031.0179    167619325  1663.0709  \n",
       "2     292.6745       180883     1.0499  \n",
       "3    2629.1104     30059143   290.3185  \n",
       "4    4850.4207     43161894   446.3074  \n",
       "5    7745.5748     59266869   645.7806  \n",
       "6    5899.9870     29897454   267.6896  \n",
       "7     166.1481       177690     1.7389  \n",
       "8    2550.9660     26507281   326.6579  \n",
       "9    2443.6943    167608743  1662.7611  \n",
       "10   3566.3140     96758501  1121.7669  \n",
       "11   5294.4201     74850860   722.6687  \n",
       "12   9436.9860  21314695869  2308.7864  \n",
       "13  11381.5970   9963819871  1190.5511  \n",
       "14   5933.3330      7753541     0.4513  \n",
       "15   4941.8240   3217136527   485.3226  \n",
       "16   6583.3690   1865664824   295.5012  \n",
       "17   1626.0860   1976526610   294.9122  \n",
       "18   1265.9570   4273882852   508.2764  \n",
       "19   7305.4450  21141490576  2303.5894  \n",
       "20   9592.3240   8065288135   855.8098  \n",
       "21   1621.4700  21314695869  2308.7864  \n",
       "22   1695.4060  21293400232  2307.8826  \n",
       "23   1064.9210     21295637     0.9038  \n",
       "24   7309.8120   1865664824   295.5012  \n",
       "25   1703.1970   1976526610   294.9122  "
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [],
   "source": [
    "I000002 = ts.get_hist_data('000002')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>open</th>\n",
       "      <th>high</th>\n",
       "      <th>close</th>\n",
       "      <th>low</th>\n",
       "      <th>volume</th>\n",
       "      <th>price_change</th>\n",
       "      <th>p_change</th>\n",
       "      <th>ma5</th>\n",
       "      <th>ma10</th>\n",
       "      <th>ma20</th>\n",
       "      <th>v_ma5</th>\n",
       "      <th>v_ma10</th>\n",
       "      <th>v_ma20</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>date</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2018-07-25</th>\n",
       "      <td>24.38</td>\n",
       "      <td>24.58</td>\n",
       "      <td>24.18</td>\n",
       "      <td>24.00</td>\n",
       "      <td>355182.97</td>\n",
       "      <td>-0.20</td>\n",
       "      <td>-0.82</td>\n",
       "      <td>23.626</td>\n",
       "      <td>23.430</td>\n",
       "      <td>23.494</td>\n",
       "      <td>572169.62</td>\n",
       "      <td>480783.72</td>\n",
       "      <td>448171.61</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-07-24</th>\n",
       "      <td>24.04</td>\n",
       "      <td>25.09</td>\n",
       "      <td>24.38</td>\n",
       "      <td>24.04</td>\n",
       "      <td>832814.25</td>\n",
       "      <td>0.63</td>\n",
       "      <td>2.65</td>\n",
       "      <td>23.284</td>\n",
       "      <td>23.358</td>\n",
       "      <td>23.496</td>\n",
       "      <td>583261.40</td>\n",
       "      <td>473870.72</td>\n",
       "      <td>464029.83</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-07-23</th>\n",
       "      <td>22.96</td>\n",
       "      <td>23.90</td>\n",
       "      <td>23.75</td>\n",
       "      <td>22.90</td>\n",
       "      <td>555706.12</td>\n",
       "      <td>0.61</td>\n",
       "      <td>2.64</td>\n",
       "      <td>23.004</td>\n",
       "      <td>23.335</td>\n",
       "      <td>23.554</td>\n",
       "      <td>479472.41</td>\n",
       "      <td>429515.24</td>\n",
       "      <td>451979.58</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-07-20</th>\n",
       "      <td>22.64</td>\n",
       "      <td>23.49</td>\n",
       "      <td>23.14</td>\n",
       "      <td>22.02</td>\n",
       "      <td>610195.38</td>\n",
       "      <td>0.46</td>\n",
       "      <td>2.03</td>\n",
       "      <td>22.884</td>\n",
       "      <td>23.361</td>\n",
       "      <td>23.691</td>\n",
       "      <td>454470.01</td>\n",
       "      <td>414407.29</td>\n",
       "      <td>454984.86</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-07-19</th>\n",
       "      <td>22.70</td>\n",
       "      <td>22.96</td>\n",
       "      <td>22.68</td>\n",
       "      <td>22.50</td>\n",
       "      <td>506949.38</td>\n",
       "      <td>0.21</td>\n",
       "      <td>0.94</td>\n",
       "      <td>23.000</td>\n",
       "      <td>23.368</td>\n",
       "      <td>23.939</td>\n",
       "      <td>413942.01</td>\n",
       "      <td>388080.75</td>\n",
       "      <td>446693.42</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "             open   high  close    low     volume  price_change  p_change  \\\n",
       "date                                                                        \n",
       "2018-07-25  24.38  24.58  24.18  24.00  355182.97         -0.20     -0.82   \n",
       "2018-07-24  24.04  25.09  24.38  24.04  832814.25          0.63      2.65   \n",
       "2018-07-23  22.96  23.90  23.75  22.90  555706.12          0.61      2.64   \n",
       "2018-07-20  22.64  23.49  23.14  22.02  610195.38          0.46      2.03   \n",
       "2018-07-19  22.70  22.96  22.68  22.50  506949.38          0.21      0.94   \n",
       "\n",
       "               ma5    ma10    ma20      v_ma5     v_ma10     v_ma20  \n",
       "date                                                                 \n",
       "2018-07-25  23.626  23.430  23.494  572169.62  480783.72  448171.61  \n",
       "2018-07-24  23.284  23.358  23.496  583261.40  473870.72  464029.83  \n",
       "2018-07-23  23.004  23.335  23.554  479472.41  429515.24  451979.58  \n",
       "2018-07-20  22.884  23.361  23.691  454470.01  414407.29  454984.86  \n",
       "2018-07-19  23.000  23.368  23.939  413942.01  388080.75  446693.42  "
      ]
     },
     "execution_count": 27,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "I000002.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "sh = ts.get_hist_data('sh')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>open</th>\n",
       "      <th>high</th>\n",
       "      <th>close</th>\n",
       "      <th>low</th>\n",
       "      <th>volume</th>\n",
       "      <th>price_change</th>\n",
       "      <th>p_change</th>\n",
       "      <th>ma5</th>\n",
       "      <th>ma10</th>\n",
       "      <th>ma20</th>\n",
       "      <th>v_ma5</th>\n",
       "      <th>v_ma10</th>\n",
       "      <th>v_ma20</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>date</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2018-07-25</th>\n",
       "      <td>2911.45</td>\n",
       "      <td>2912.31</td>\n",
       "      <td>2903.65</td>\n",
       "      <td>2894.04</td>\n",
       "      <td>1678002.12</td>\n",
       "      <td>-1.91</td>\n",
       "      <td>-0.07</td>\n",
       "      <td>2854.114</td>\n",
       "      <td>2833.884</td>\n",
       "      <td>2809.818</td>\n",
       "      <td>1662310.98</td>\n",
       "      <td>1429962.58</td>\n",
       "      <td>1353870.77</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-07-24</th>\n",
       "      <td>2862.27</td>\n",
       "      <td>2911.46</td>\n",
       "      <td>2905.56</td>\n",
       "      <td>2862.27</td>\n",
       "      <td>2295783.00</td>\n",
       "      <td>46.02</td>\n",
       "      <td>1.61</td>\n",
       "      <td>2830.836</td>\n",
       "      <td>2821.296</td>\n",
       "      <td>2805.295</td>\n",
       "      <td>1568632.88</td>\n",
       "      <td>1388983.51</td>\n",
       "      <td>1334681.09</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-07-23</th>\n",
       "      <td>2815.20</td>\n",
       "      <td>2863.57</td>\n",
       "      <td>2859.54</td>\n",
       "      <td>2809.62</td>\n",
       "      <td>1733828.00</td>\n",
       "      <td>30.27</td>\n",
       "      <td>1.07</td>\n",
       "      <td>2809.350</td>\n",
       "      <td>2813.503</td>\n",
       "      <td>2802.242</td>\n",
       "      <td>1320294.73</td>\n",
       "      <td>1276467.96</td>\n",
       "      <td>1282851.17</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-07-20</th>\n",
       "      <td>2769.75</td>\n",
       "      <td>2837.86</td>\n",
       "      <td>2829.27</td>\n",
       "      <td>2753.84</td>\n",
       "      <td>1459076.88</td>\n",
       "      <td>56.72</td>\n",
       "      <td>2.05</td>\n",
       "      <td>2800.250</td>\n",
       "      <td>2809.060</td>\n",
       "      <td>2802.232</td>\n",
       "      <td>1189063.43</td>\n",
       "      <td>1224634.48</td>\n",
       "      <td>1257118.61</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-07-19</th>\n",
       "      <td>2791.02</td>\n",
       "      <td>2805.01</td>\n",
       "      <td>2772.55</td>\n",
       "      <td>2764.49</td>\n",
       "      <td>1144864.88</td>\n",
       "      <td>-14.71</td>\n",
       "      <td>-0.53</td>\n",
       "      <td>2800.632</td>\n",
       "      <td>2800.856</td>\n",
       "      <td>2805.257</td>\n",
       "      <td>1132626.75</td>\n",
       "      <td>1215021.16</td>\n",
       "      <td>1247236.33</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "               open     high    close      low      volume  price_change  \\\n",
       "date                                                                       \n",
       "2018-07-25  2911.45  2912.31  2903.65  2894.04  1678002.12         -1.91   \n",
       "2018-07-24  2862.27  2911.46  2905.56  2862.27  2295783.00         46.02   \n",
       "2018-07-23  2815.20  2863.57  2859.54  2809.62  1733828.00         30.27   \n",
       "2018-07-20  2769.75  2837.86  2829.27  2753.84  1459076.88         56.72   \n",
       "2018-07-19  2791.02  2805.01  2772.55  2764.49  1144864.88        -14.71   \n",
       "\n",
       "            p_change       ma5      ma10      ma20       v_ma5      v_ma10  \\\n",
       "date                                                                         \n",
       "2018-07-25     -0.07  2854.114  2833.884  2809.818  1662310.98  1429962.58   \n",
       "2018-07-24      1.61  2830.836  2821.296  2805.295  1568632.88  1388983.51   \n",
       "2018-07-23      1.07  2809.350  2813.503  2802.242  1320294.73  1276467.96   \n",
       "2018-07-20      2.05  2800.250  2809.060  2802.232  1189063.43  1224634.48   \n",
       "2018-07-19     -0.53  2800.632  2800.856  2805.257  1132626.75  1215021.16   \n",
       "\n",
       "                v_ma20  \n",
       "date                    \n",
       "2018-07-25  1353870.77  \n",
       "2018-07-24  1334681.09  \n",
       "2018-07-23  1282851.17  \n",
       "2018-07-20  1257118.61  \n",
       "2018-07-19  1247236.33  "
      ]
     },
     "execution_count": 28,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "sh.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [],
   "source": [
    "sz = ts.get_hist_data('sz') #获取深圳成指k线数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [],
   "source": [
    "sz"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [],
   "source": [
    "hs300 = ts.get_hist_data('hs300') #获取沪深300指数k线数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>open</th>\n",
       "      <th>high</th>\n",
       "      <th>close</th>\n",
       "      <th>low</th>\n",
       "      <th>volume</th>\n",
       "      <th>price_change</th>\n",
       "      <th>p_change</th>\n",
       "      <th>ma5</th>\n",
       "      <th>ma10</th>\n",
       "      <th>ma20</th>\n",
       "      <th>v_ma5</th>\n",
       "      <th>v_ma10</th>\n",
       "      <th>v_ma20</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>date</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2018-07-25</th>\n",
       "      <td>3589.51</td>\n",
       "      <td>3589.98</td>\n",
       "      <td>3577.75</td>\n",
       "      <td>3566.31</td>\n",
       "      <td>967585.00</td>\n",
       "      <td>-3.96</td>\n",
       "      <td>-0.11</td>\n",
       "      <td>3521.288</td>\n",
       "      <td>3493.298</td>\n",
       "      <td>3454.514</td>\n",
       "      <td>1086340.01</td>\n",
       "      <td>909274.88</td>\n",
       "      <td>851557.49</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-07-24</th>\n",
       "      <td>3530.66</td>\n",
       "      <td>3596.51</td>\n",
       "      <td>3581.71</td>\n",
       "      <td>3530.66</td>\n",
       "      <td>1569124.38</td>\n",
       "      <td>55.96</td>\n",
       "      <td>1.59</td>\n",
       "      <td>3492.002</td>\n",
       "      <td>3476.276</td>\n",
       "      <td>3448.589</td>\n",
       "      <td>1025883.68</td>\n",
       "      <td>884557.33</td>\n",
       "      <td>843924.15</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-07-23</th>\n",
       "      <td>3471.86</td>\n",
       "      <td>3527.53</td>\n",
       "      <td>3525.75</td>\n",
       "      <td>3464.65</td>\n",
       "      <td>1190366.25</td>\n",
       "      <td>32.86</td>\n",
       "      <td>0.94</td>\n",
       "      <td>3465.536</td>\n",
       "      <td>3464.857</td>\n",
       "      <td>3446.059</td>\n",
       "      <td>836024.95</td>\n",
       "      <td>797193.71</td>\n",
       "      <td>807960.57</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-07-20</th>\n",
       "      <td>3426.46</td>\n",
       "      <td>3505.93</td>\n",
       "      <td>3492.89</td>\n",
       "      <td>3398.95</td>\n",
       "      <td>1019847.25</td>\n",
       "      <td>64.55</td>\n",
       "      <td>1.88</td>\n",
       "      <td>3454.804</td>\n",
       "      <td>3458.200</td>\n",
       "      <td>3447.796</td>\n",
       "      <td>734515.70</td>\n",
       "      <td>754758.63</td>\n",
       "      <td>788380.79</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-07-19</th>\n",
       "      <td>3444.80</td>\n",
       "      <td>3466.51</td>\n",
       "      <td>3428.34</td>\n",
       "      <td>3417.96</td>\n",
       "      <td>684777.19</td>\n",
       "      <td>-2.98</td>\n",
       "      <td>-0.09</td>\n",
       "      <td>3454.764</td>\n",
       "      <td>3445.423</td>\n",
       "      <td>3453.596</td>\n",
       "      <td>676458.05</td>\n",
       "      <td>738871.49</td>\n",
       "      <td>774947.36</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "               open     high    close      low      volume  price_change  \\\n",
       "date                                                                       \n",
       "2018-07-25  3589.51  3589.98  3577.75  3566.31   967585.00         -3.96   \n",
       "2018-07-24  3530.66  3596.51  3581.71  3530.66  1569124.38         55.96   \n",
       "2018-07-23  3471.86  3527.53  3525.75  3464.65  1190366.25         32.86   \n",
       "2018-07-20  3426.46  3505.93  3492.89  3398.95  1019847.25         64.55   \n",
       "2018-07-19  3444.80  3466.51  3428.34  3417.96   684777.19         -2.98   \n",
       "\n",
       "            p_change       ma5      ma10      ma20       v_ma5     v_ma10  \\\n",
       "date                                                                        \n",
       "2018-07-25     -0.11  3521.288  3493.298  3454.514  1086340.01  909274.88   \n",
       "2018-07-24      1.59  3492.002  3476.276  3448.589  1025883.68  884557.33   \n",
       "2018-07-23      0.94  3465.536  3464.857  3446.059   836024.95  797193.71   \n",
       "2018-07-20      1.88  3454.804  3458.200  3447.796   734515.70  754758.63   \n",
       "2018-07-19     -0.09  3454.764  3445.423  3453.596   676458.05  738871.49   \n",
       "\n",
       "               v_ma20  \n",
       "date                   \n",
       "2018-07-25  851557.49  \n",
       "2018-07-24  843924.15  \n",
       "2018-07-23  807960.57  \n",
       "2018-07-20  788380.79  \n",
       "2018-07-19  774947.36  "
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "hs300.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [],
   "source": [
    "sz50 = ts.get_hist_data('sz50') #获取上证50指数k线数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>open</th>\n",
       "      <th>high</th>\n",
       "      <th>close</th>\n",
       "      <th>low</th>\n",
       "      <th>volume</th>\n",
       "      <th>price_change</th>\n",
       "      <th>p_change</th>\n",
       "      <th>ma5</th>\n",
       "      <th>ma10</th>\n",
       "      <th>ma20</th>\n",
       "      <th>v_ma5</th>\n",
       "      <th>v_ma10</th>\n",
       "      <th>v_ma20</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>date</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2018-07-25</th>\n",
       "      <td>2573.93</td>\n",
       "      <td>2573.96</td>\n",
       "      <td>2563.69</td>\n",
       "      <td>2550.97</td>\n",
       "      <td>265072.81</td>\n",
       "      <td>0.11</td>\n",
       "      <td>0.00</td>\n",
       "      <td>2514.802</td>\n",
       "      <td>2482.546</td>\n",
       "      <td>2451.306</td>\n",
       "      <td>339731.77</td>\n",
       "      <td>271368.44</td>\n",
       "      <td>253291.92</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-07-24</th>\n",
       "      <td>2534.07</td>\n",
       "      <td>2579.59</td>\n",
       "      <td>2563.58</td>\n",
       "      <td>2534.07</td>\n",
       "      <td>488334.16</td>\n",
       "      <td>36.77</td>\n",
       "      <td>1.46</td>\n",
       "      <td>2486.216</td>\n",
       "      <td>2469.405</td>\n",
       "      <td>2445.754</td>\n",
       "      <td>322332.14</td>\n",
       "      <td>265713.06</td>\n",
       "      <td>253751.74</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-07-23</th>\n",
       "      <td>2482.05</td>\n",
       "      <td>2533.77</td>\n",
       "      <td>2526.81</td>\n",
       "      <td>2478.19</td>\n",
       "      <td>396256.62</td>\n",
       "      <td>33.04</td>\n",
       "      <td>1.32</td>\n",
       "      <td>2459.588</td>\n",
       "      <td>2460.170</td>\n",
       "      <td>2442.911</td>\n",
       "      <td>257998.18</td>\n",
       "      <td>238253.11</td>\n",
       "      <td>242560.09</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-07-20</th>\n",
       "      <td>2426.10</td>\n",
       "      <td>2506.94</td>\n",
       "      <td>2493.77</td>\n",
       "      <td>2409.05</td>\n",
       "      <td>344534.72</td>\n",
       "      <td>67.61</td>\n",
       "      <td>2.79</td>\n",
       "      <td>2443.980</td>\n",
       "      <td>2454.618</td>\n",
       "      <td>2443.393</td>\n",
       "      <td>218491.78</td>\n",
       "      <td>222960.81</td>\n",
       "      <td>234468.80</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-07-19</th>\n",
       "      <td>2432.89</td>\n",
       "      <td>2452.45</td>\n",
       "      <td>2426.16</td>\n",
       "      <td>2418.66</td>\n",
       "      <td>204460.55</td>\n",
       "      <td>5.40</td>\n",
       "      <td>0.22</td>\n",
       "      <td>2440.598</td>\n",
       "      <td>2445.503</td>\n",
       "      <td>2447.890</td>\n",
       "      <td>189249.03</td>\n",
       "      <td>213429.37</td>\n",
       "      <td>227071.48</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "               open     high    close      low     volume  price_change  \\\n",
       "date                                                                      \n",
       "2018-07-25  2573.93  2573.96  2563.69  2550.97  265072.81          0.11   \n",
       "2018-07-24  2534.07  2579.59  2563.58  2534.07  488334.16         36.77   \n",
       "2018-07-23  2482.05  2533.77  2526.81  2478.19  396256.62         33.04   \n",
       "2018-07-20  2426.10  2506.94  2493.77  2409.05  344534.72         67.61   \n",
       "2018-07-19  2432.89  2452.45  2426.16  2418.66  204460.55          5.40   \n",
       "\n",
       "            p_change       ma5      ma10      ma20      v_ma5     v_ma10  \\\n",
       "date                                                                       \n",
       "2018-07-25      0.00  2514.802  2482.546  2451.306  339731.77  271368.44   \n",
       "2018-07-24      1.46  2486.216  2469.405  2445.754  322332.14  265713.06   \n",
       "2018-07-23      1.32  2459.588  2460.170  2442.911  257998.18  238253.11   \n",
       "2018-07-20      2.79  2443.980  2454.618  2443.393  218491.78  222960.81   \n",
       "2018-07-19      0.22  2440.598  2445.503  2447.890  189249.03  213429.37   \n",
       "\n",
       "               v_ma20  \n",
       "date                   \n",
       "2018-07-25  253291.92  \n",
       "2018-07-24  253751.74  \n",
       "2018-07-23  242560.09  \n",
       "2018-07-20  234468.80  \n",
       "2018-07-19  227071.48  "
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "sz50.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [],
   "source": [
    "zxb = ts.get_hist_data('zxb') #获取中小板指数k线数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [],
   "source": [
    "zxb"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [],
   "source": [
    "cyb = ts.get_hist_data('cyb')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [],
   "source": [
    "cyb"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 大单交易数据\n",
    "\n",
    "获取大单交易数据，默认为大于等于400手，数据来源于新浪财经。\n",
    "\n",
    "参数说明：\n",
    "\n",
    "    code：股票代码，即6位数字代码\n",
    "    date:日期，格式YYYY-MM-DD\n",
    "    vol:手数，默认为400手，输入数值型参数\n",
    "    retry_count : int, 默认3,如遇网络等问题重复执行的次数\n",
    "    pause : int, 默认 0,重复请求数据过程中暂停的秒数，防止请求间隔时间太短出现的问题\n",
    "\n",
    "返回值说明：\n",
    "\n",
    "    code：代码\n",
    "    name：名称\n",
    "    time：时间\n",
    "    price：当前价格\n",
    "    volume：成交手\n",
    "    preprice ：上一笔价格\n",
    "    type：买卖类型【买盘、卖盘、中性盘】\n",
    "\n",
    "调用方法：\n",
    "\n",
    "import tushare as ts\n",
    "\n",
    "df = ts.get_sina_dd('600848', date='2015-12-24') #默认400手\n",
    "#df = ts.get_sina_dd('600848', date='2015-12-24', vol=500)  #指定大于等于500手的数据\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
